# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gspell
pkgver=1.9.1
pkgrel=3
pkgdesc="Flexible API to add spell checking to a GTK+ application"
options="!check" # Test fails because of missing machine-id
url="https://wiki.gnome.org/Projects/gspell"
arch="all"
license="LGPL-2.1-or-later"
depends="iso-codes"
makedepends="glib-dev vala iso-codes-dev gtk+3.0-dev enchant2-dev
	gobject-introspection-dev"
checkdepends="xvfb-run hunspell-en ibus"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-dbg"
source="https://download.gnome.org/sources/gspell/${pkgver%.*}/gspell-$pkgver.tar.xz"

case "$CARCH" in
	s390x)
		options="!check" # Requires ibus which is s390x-only
		;;
esac

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	xvfb-run make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="72f1fb384e02bb73397b457c3e8a7b98393c9fab5c0dad07f84d1db3f6b75c093663cc83c13fefe868424c503abc2fb89c8b045d0495dd43ddcedad025f23bca  gspell-1.9.1.tar.xz"
